package com.maiji.cloud.service;

import com.maiji.cloud.entities.shopingmall.ShareOrderRule;
import com.maiji.cloud.entities.shopingmall.ShopingOrder;
import com.baomidou.mybatisplus.service.IService;
import com.maiji.cloud.request.BaseDataReqDto;
import com.maiji.cloud.request.ReqMetaData;
import com.maiji.cloud.request.shopingmall.*;
import com.maiji.cloud.response.BaseDataResDto;
import com.maiji.cloud.response.BaseMetaResDto;
import com.maiji.cloud.response.BaseResDto;
import com.maiji.cloud.response.shopingmall.LogisticsInfoResData;
import com.maiji.cloud.response.shopingmall.ShareOrderLogResData;
import com.maiji.cloud.response.shopingmall.ShopingOrderResData;
import com.maiji.cloud.response.shopingmall.ShopingOrderStatusCountResData;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

public interface ShopingOrderService extends IService<ShopingOrder> {

    BaseDataResDto<ShopingOrderResData> orderSubmit(OrderSubmitReqDto.OrderSubmitReqData data, String userId, String token);

    BaseDataResDto<ShopingOrderResData> findOrderById(String orderId);

    BaseDataResDto<ShopingOrderResData>  cancelOrderById(String orderId, String cancelReason);

    BaseMetaResDto<List<ShopingOrderResData>> findOrdersByUserId(String goodsName, String userId);

    BaseMetaResDto<List<ShopingOrderResData>> findAllOrders(OrderFindAllReqData data, ReqMetaData metaData, String userId);

    BaseDataResDto<ShopingOrderResData> initOrder(OrderInitReqDto.OrderInitReqData data, String userId, String token);

    BaseDataResDto<ShopingOrderResData> refreshOrder(OrderRefreshReqDto.OrderRefreshReqData data, String userId, String token);

    BaseResDto delOrdersByIds(List<String> orderIds);

    BaseResDto remindSendByOrderId(String orderId);

    List<ShopingOrderResData> findAllShopingOrderResDataList(List<ShopingOrder> shopingOrders);

    /**
     * 根据订单id获取运单编号集合
     * @param param
     * @return
     */
	BaseDataResDto<List<String>> getTrackingNumberByOrderId(BaseDataReqDto<String> param);

	/**
	 * 根据运单号获取物流信息
	 * @param param
	 * @return
	 */
	BaseDataResDto<LogisticsInfoResData> getLogisticsInfoByExpressNo(BaseDataReqDto<String> param) throws Exception;

    BaseDataResDto<List<ShopingOrderStatusCountResData>> findAllShopingOrderStatusCount(String userId);

    /**
     * 积分兑换商品
     * @param param
     * @return
     */
    BaseDataResDto<ShopingOrderResData> integralExchangeGoods(BaseDataReqDto<IntegralExchangeGoodsReqData> param, String userId);

    BaseResDto orderConfirmReceived(String orderId);

    BaseResDto editOrder(ShopingOrderEditLogReqData data);
    
    /**
     * 上传运单号
     * @param param
     * @return
     */
	BaseResDto uploudRefundNum(BaseDataReqDto<UploudRefundNumReqData> param);

    BaseMetaResDto<List<List<ShopingOrderResData>>> findAllOrders1(OrderFindAllReqData data, ReqMetaData metaData);

    BaseDataResDto<HashMap> findAndSetOrderAutoSet(HashMap data);

}
